﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using RN.ERP.BLL;
using Newtonsoft.Json;
using RN.ERP.DTO;
using System.ServiceModel.Activation;

namespace RN.ERP
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码、svc 和配置文件中的类名“OrderService”。
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class ProjectService : IProjectService
    {
        BaseProjectBLL projectBll = (BaseProjectBLL)BllFactory.CreateBll(BllType.Project, Utilities.GetDbType());

        public string GetProjectList(int pageCount, int pageSize, string conditions, out int count)
        {
            return JsonConvert.SerializeObject(projectBll.GetProjectList(pageCount, pageSize, conditions, out count));
        }

        public string GetJrkbProject(string areaCode, int codeClass)
        {
            return JsonConvert.SerializeObject(projectBll.GetJrkbProject(areaCode, codeClass));
        }


        #region 省招标代理业绩
        public string GetyjRecordList(string Code, int pageCount, int pageSize, string conditions, string areaCode, out int count, out double? totalZBMpney)
        {
            return JsonConvert.SerializeObject(projectBll.GetyjRecordList(Code, pageCount, pageSize, conditions, areaCode, out count,out totalZBMpney));
        }

        public string GetProjectYJRecord(int projectID, string Code, string areaCode)
        {
            return JsonConvert.SerializeObject(projectBll.GetProjectYJRecord(projectID, Code, areaCode));
        }
        #endregion
    }
}
